package model

import "github.com/crack007/go-im/src/common/util"

type NodeModel struct {
	Id            string `json:"name"`
	Ip            string `json:"ip"`
	Port          uint16 `json:"grpcPort"`
	WsPort        uint16 `json:"WsPort"`
	IsMaster      bool   `json:"-"`
	LastConnected int64  `json:"-"` // 最后通信时间
}

func NewNodeModel() *NodeModel {
	return &NodeModel{}
}
func (m *NodeModel) String() string {
	return util.ToJson(m)
}
